[BUILD] Miscellaneous build-system fixes and tweaks.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 3 Jul 2006 07:56:29 +0000 (08:56 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 3 Jul 2006 07:56:29 +0000 (08:56 +0100)
* Don't delete non-existent %.tar.bz2 in buildconfigs/Rules.mk's %-mrproper
* Add a mrpropper target to buildconfigs/mk.linux-2.6-xen, and
  have this delete the local tarball
  - This should also delete the local patch, if there is one, but I am not
    sure how to do this with the current incarntation of the code, and I
    will post a subsequent patch which makes this easier and effects this
    chang. As there currently is no local patch this is not a big deal at
    this moment. (Horms)
* Stop kclean from erroring out if the kernel directory doesn't exist
* Remove patches/*/.makedep in top level Makefile rather than in
  buildconfigs/Rules.mk, as calling rules in the latter causes
  patches/*/.make to be created (Magnus)

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Horms <horms@verge.net.au>
Makefile
buildconfigs/Rules.mk
buildconfigs/mk.linux-2.6-xen

index 703f47daf16c96e02f3cc6d96e0d25d824b63752..186b7567659c66e39c6fc6c2480fff147648be80 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -130,6 +130,7 @@ distclean:
        rm -rf dist patches/tmp
        for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
        for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
+       rm -rf patches/*/.makedep
 
 # Linux name for GNU distclean
 .PHONY: mrproper
index a889c32ea0f64283c89cee823b8f4259d85f56b0..5e7d659a5b4faf80f78a8881f42a42f40bbd113c 100644 (file)
@@ -59,10 +59,6 @@ ifneq ($(PATCHDIRS),)
 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: 
        @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
 
-.PHONY: clean
-clean::
-       rm -f patches/*/.makedep
-
 ref-%/.valid-ref: pristine-%/.valid-pristine
        set -e
        rm -rf $(@D)
@@ -111,7 +107,8 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf tmp-$@
 
 %-mrproper:
-       rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
+       $(MAKE) -f buildconfigs/mk.$*-xen mrpropper
+       rm -rf pristine-$(*)* ref-$(*)*
        rm -rf $*-xen.patch
 
 .PHONY: config-update-pae
index 04070337f1ac9d18411bc89b2a6821badcf0ed14..ce861acc1bd47654a643de23ffc6086d430a3b9f 100644 (file)
@@ -47,8 +47,14 @@ config: $(LINUX_DIR)/include/linux/autoconf.h
 
 .PHONY: clean
 clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
+       [ ! -d $(LINUX_DIR) ] || \
+               $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
+
 
 .PHONY: delete
 delete: 
        rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) 
+
+.PHONY: mrpropper
+mrpropper:
+       rm -f linux-$(LINUX_VER).tar.bz2